import {Meta} from '@storybook/blocks';

<Meta title="Docs/Publish" />

## First publication

1. Add necessary fields to `package.json`:
   ```json
   {
     "license": "MIT",
     "engines": {
       "node": ">=10"
     },
     "description": "Describe your library purpose",
     "keywords": ["put", "some", " descriptive", "keywords", "here"],
     "repository": {
       "type": "git",
       "url": "https://github.com/<github-user>/<repo-name>",
       "directory": "/"
     },
     "homepage": "https://github.com/<github-user>/<repo-name>",
     "bugs": {
       "url": "https://github.com/<github-user>/<repo-name>/issues"
     }
   }
   ```
2. Execute `npm login` in the root directory.
3. Build library - `yarn build:lib`.
4. Publish library - `npm publish`.

## Update library

1. Commit changes to git.
2. Update npm version number with [one of these commands](https://docs.npmjs.com/updating-your-published-package-version-number).
3. Run `npm publish`.
